package decorativePattern;

/**
 * 每一行代码，都是改变世界的力量
 *
 * @author 郭帅
 * @date 2022/11/14 18:43
 */
public class Test {
    public static void main(String[] args) {
        Beverage beverage = new Espresso();
        System.out.println(beverage.getDesc() + ", cost:" + beverage.cost());
        Beverage beverage1 = new Mocha(beverage);
        beverage1 = new Mocha(beverage1);
        beverage1 = new Mocha(beverage1);
        System.out.println(beverage1.getDesc() + ", cost:" + beverage1.cost());
    }
}
